<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>密码列表</title>
    <link rel="stylesheet" href="../../lib/weui/weui.min.css">
    <link rel="stylesheet" href="../../font/iconfont.css">
    <link rel="stylesheet" href="../../css/style.css">
    <style>
        .form .form-item {
            width: 340px;
        }
        .form .form-item .right-btn {
            position: absolute;
            width: 40px;
            height: 40px;
            right: 5px;
            top:50%;
            display: table-cell;
            text-align: center;
            vertical-align: middle;
            margin-top: -20px;
            color: rgba(0,0,0,.5);
        }
        .add-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%; 
            text-align: center;
            line-height: 50px;
            color: white;
            background: #4d94ff;
            position: fixed;
            bottom: 50px;
            right: 20px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="header" id="header">
            <!-- <div class="left-btn btn" @click="back"><span class="wjxfont icon-fanhui1" style="font-size: 20px;"></span></div> -->
            <div class="right-btn btn" @click="login">退出</div>
            <div class="title">列表</div>
        </div>
        <div class="form">
            <div class="form-item">
                <div class="label"></div>
                <div class="input">
                    <input type="search" v-model="formData.tags" @search="submit" placeholder="搜索">
                </div>
                <div class="right-btn btn" @click="clear"><span class="wjxfont icon-chahao2" style="font-size: 24px;"></span></div>
            </div>
        </div>
        <div class="weui-cells">
            <a class="weui-cell weui-cell_access" v-for="(item,index) in dataList" :key="index" @click="detail(index)">
                <div class="weui-cell__hd"><img src="..." alt="" style="width:20px;margin-right:5px;display:block">
                </div>
                <div class="weui-cell__bd">
                    <p>{{item.password}}</p>
                </div>
                <div class="weui-cell__ft">{{item.account}}</div>
            </a>
        </div>
        <div class="add-btn btn">
            <div class="btn" @click="add"><span class="wjxfont icon-zengjiamokuai" style="font-size: 24px;"></span></div>
        </div>

        <!-- modal层 -->
        <!-- 加载进度条 -->
        <div :class="{hide: hideLoadingToast}">
            <div class="weui-mask_transparent"></div>
            <div class="weui-toast">
                <i class="weui-loading weui-icon_toast"></i>
                <p class="weui-toast__content">数据加载中</p>
            </div>
        </div>
        <!-- 错误提示警告框 -->
        <div :class="{hide: errorAlert.hideErrorAlert}">
            <div class="weui-mask"></div>
            <div class="weui-dialog">
                <div class="weui-dialog__hd"><strong class="weui-dialog__title">错误</strong></div>
                <div class="weui-dialog__bd">{{errorAlert.errMsg}}</div>
                <div class="weui-dialog__ft">
                    <a @click="hideAlert" class="weui-dialog__btn weui-dialog__btn_primary">确定</a>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
<!-- lib -->
<script src="../../lib/vue/vue.min.js"></script>
<script src="../../lib/zepto/zepto.min.js"></script>

<!-- util -->
<script src="../../util/mm.js"></script>

<script src="../../script/constants.js"></script>

<!-- service -->
<script src="../../script/service/key-service.js"></script>

<script src="./main.js"></script>